<%@page import="java.util.List"%>
<%@page import="fr.cinescope2014.modeles.BoxOffice"%>
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ page import="java.sql.*" %>

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>BoxOffice.jsp</title>
        <link href="/CineScope2014FO/css/principal.css" rel="stylesheet" type="text/css">
    </head>

    <body>
        <%@include file="../jsp/_entete.jsp" %>
        <%@include file="../jsp/_rechercher.jsp" %>
        <%@include file="../jsp/_sommaire.jsp" %>

        <div id="centre">

            <h3>New Box office</h3>

            <%-- Modele --%>
            <%!
            %>

            <%        
            %>
            <table border="0">
                <thead>
                    <tr>
                        <th>Titre</th>
                        <th>Total des entrées</th>
                    </tr>
                </thead>
                <tbody>
                    <%
                        List<BoxOffice> liste = (List)request.getAttribute("liste");
                        for (BoxOffice objet : liste) {
                    %>
                    <tr>
                        <td><% out.println(objet.getTitreFilm()); %></td>
                        <td><% out.println(objet.getTotalEntrees()); %></td>
                    </tr>
                    <%    
                        }
                    %>
                </tbody>
            </table>

        </div>

        <%@include file="../jsp/_pied.jsp" %>
    </body>
</html>